package com.itcncp.wechat.app.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

public class UserInvoiceInfo implements Serializable {
    /**
     * 发票信息id
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long invoiceId;

    /**
     * 用户id
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long userId;

    /**
     * 发票类型 1:个人 2:单位
     *
     * @mbg.generated
     */
    private Byte invoiceType;

    /**
     * 发票抬头
     *
     * @mbg.generated
     */
    private String invoiceRise;

    /**
     * 纳税人识别号
     *
     * @mbg.generated
     */
    private String invoiceIdent;

    /**
     * 是否为默认发票 1:不是默认发票 2:是默认发票
     *
     * @mbg.generated
     */
    private Byte defaultFlag;

    /**
     * 发票信息别名
     *
     * @mbg.generated
     */
    private String customTitle;

    /**
     * 发票类别 1、纸质发票 2、电子发票
     *
     * @mbg.generated
     */
    private Byte invoiceClass;

    /**
     * 开户行及账号
     *
     * @mbg.generated
     */
    private String bankCardno;

    /**
     * 发件收件人
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 手机号
     *
     * @mbg.generated
     */
    private String mobilePhone;

    /**
     * 发票收件地址
     *
     * @mbg.generated
     */
    private String area;

    /**
     * 发票收件详细地址
     *
     * @mbg.generated
     */
    private String address;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Date createTime;

    private String remark;

    /**
     * 地址、电话
     *
     * @mbg.generated
     */
    private String addrTel;

    /**
     * 邮箱地址
     *
     * @mbg.generated
     */
    private String emailAddr;

    private static final long serialVersionUID = 1L;

    public Long getInvoiceId() {
        return invoiceId;
    }

    public void setInvoiceId(Long invoiceId) {
        this.invoiceId = invoiceId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Byte getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(Byte invoiceType) {
        this.invoiceType = invoiceType;
    }

    public String getInvoiceRise() {
        return invoiceRise;
    }

    public void setInvoiceRise(String invoiceRise) {
        this.invoiceRise = invoiceRise;
    }

    public String getInvoiceIdent() {
        return invoiceIdent;
    }

    public void setInvoiceIdent(String invoiceIdent) {
        this.invoiceIdent = invoiceIdent;
    }

    public Byte getDefaultFlag() {
        return defaultFlag;
    }

    public void setDefaultFlag(Byte defaultFlag) {
        this.defaultFlag = defaultFlag;
    }

    public String getCustomTitle() {
        return customTitle;
    }

    public void setCustomTitle(String customTitle) {
        this.customTitle = customTitle;
    }

    public Byte getInvoiceClass() {
        return invoiceClass;
    }

    public void setInvoiceClass(Byte invoiceClass) {
        this.invoiceClass = invoiceClass;
    }

    public String getBankCardno() {
        return bankCardno;
    }

    public void setBankCardno(String bankCardno) {
        this.bankCardno = bankCardno;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getAddrTel() {
        return addrTel;
    }

    public void setAddrTel(String addrTel) {
        this.addrTel = addrTel;
    }

    public String getEmailAddr() {
        return emailAddr;
    }

    public void setEmailAddr(String emailAddr) {
        this.emailAddr = emailAddr;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", invoiceId=").append(invoiceId);
        sb.append(", userId=").append(userId);
        sb.append(", invoiceType=").append(invoiceType);
        sb.append(", invoiceRise=").append(invoiceRise);
        sb.append(", invoiceIdent=").append(invoiceIdent);
        sb.append(", defaultFlag=").append(defaultFlag);
        sb.append(", customTitle=").append(customTitle);
        sb.append(", invoiceClass=").append(invoiceClass);
        sb.append(", bankCardno=").append(bankCardno);
        sb.append(", name=").append(name);
        sb.append(", mobilePhone=").append(mobilePhone);
        sb.append(", area=").append(area);
        sb.append(", address=").append(address);
        sb.append(", createTime=").append(createTime);
        sb.append(", remark=").append(remark);
        sb.append(", addrTel=").append(addrTel);
        sb.append(", emailAddr=").append(emailAddr);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserInvoiceInfo other = (UserInvoiceInfo) that;
        return (this.getInvoiceId() == null ? other.getInvoiceId() == null : this.getInvoiceId().equals(other.getInvoiceId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getInvoiceType() == null ? other.getInvoiceType() == null : this.getInvoiceType().equals(other.getInvoiceType()))
            && (this.getInvoiceRise() == null ? other.getInvoiceRise() == null : this.getInvoiceRise().equals(other.getInvoiceRise()))
            && (this.getInvoiceIdent() == null ? other.getInvoiceIdent() == null : this.getInvoiceIdent().equals(other.getInvoiceIdent()))
            && (this.getDefaultFlag() == null ? other.getDefaultFlag() == null : this.getDefaultFlag().equals(other.getDefaultFlag()))
            && (this.getCustomTitle() == null ? other.getCustomTitle() == null : this.getCustomTitle().equals(other.getCustomTitle()))
            && (this.getInvoiceClass() == null ? other.getInvoiceClass() == null : this.getInvoiceClass().equals(other.getInvoiceClass()))
            && (this.getBankCardno() == null ? other.getBankCardno() == null : this.getBankCardno().equals(other.getBankCardno()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getMobilePhone() == null ? other.getMobilePhone() == null : this.getMobilePhone().equals(other.getMobilePhone()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getAddrTel() == null ? other.getAddrTel() == null : this.getAddrTel().equals(other.getAddrTel()))
            && (this.getEmailAddr() == null ? other.getEmailAddr() == null : this.getEmailAddr().equals(other.getEmailAddr()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInvoiceId() == null) ? 0 : getInvoiceId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getInvoiceType() == null) ? 0 : getInvoiceType().hashCode());
        result = prime * result + ((getInvoiceRise() == null) ? 0 : getInvoiceRise().hashCode());
        result = prime * result + ((getInvoiceIdent() == null) ? 0 : getInvoiceIdent().hashCode());
        result = prime * result + ((getDefaultFlag() == null) ? 0 : getDefaultFlag().hashCode());
        result = prime * result + ((getCustomTitle() == null) ? 0 : getCustomTitle().hashCode());
        result = prime * result + ((getInvoiceClass() == null) ? 0 : getInvoiceClass().hashCode());
        result = prime * result + ((getBankCardno() == null) ? 0 : getBankCardno().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getMobilePhone() == null) ? 0 : getMobilePhone().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getAddrTel() == null) ? 0 : getAddrTel().hashCode());
        result = prime * result + ((getEmailAddr() == null) ? 0 : getEmailAddr().hashCode());
        return result;
    }
}